package com.wdcloud.niceandroid.netutil;

import java.io.Serializable;

public class BaseBean<T> implements Serializable {

    protected int code;
    protected String message;
    boolean success;
    protected T data;

    public BaseBean() {
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getTips() {
        return message;
    }

    public void setTips(String message) {
        this.message = message;
        if (null != data) {
            BaseBean instance = (BaseBean) (data);
            instance.message = this.message;
        }
    }

    @Override
    public String toString() {
        return "BaseBean{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", success=" + success +
                ", data=" + data +
                '}';
    }
}
